use serde::{Deserialize, Serialize};

use super::user::UserInfo; // find file: ../user.rs, UserInfo in that file

#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct Comment {
    // comment id
    pub id: Option<u32>,
    // the user info that expose his own comment
    pub user: Option<UserInfo>,
    // comment content
    pub content: String,
    // comment date
    pub date: Option<chrono::NaiveDate>,
    // comment at which article
    pub article: Option<u32>,
}
